import React from 'react';


import sUSDLogo from '../../assets/img/sUSD.png';
import USDCLogo from '../../assets/img/USDC.png';

import HUSD from '../../assets/image/husd.png';
import bacLogo from '../../assets/image/scach.png';
import basLogo from '../../assets/image/share.png';
import medx from '../../assets/image/medx.png';
import sfundLogo from '../../assets/image/sfund.png';
import sht from '../../assets/image/sht.png';
import ht from '../../assets/image/ht.png';
import sneo from '../../assets/image/sneo.png';
import neo from '../../assets/image/neo.png';
import seth from '../../assets/image/seth.png';
import eth from '../../assets/image/eth.png';
import sbtc from '../../assets/image/sbtc.png';
import btc from '../../assets/image/btc.png';
import usdt from '../../assets/image/usdt.png';
import usdt_fil from '../../assets/image/usdt_fil.png';
import sdot from '../../assets/image/sdot.png';
import sfil from '../../assets/image/sfil.png';
import Filda from '../../assets/image/filda.png';
import hltc_fil from '../../assets/image/hltc_fil.png';
import HLTC from '../../assets/image/ltc.png';
import BAG from '../../assets/image/basisgold.png';
import TPT from '../../assets/image/tokenpocket.png';
import hdot_fil from '../../assets/image/hdot_fil.png';
import hdot from '../../assets/image/dot.png';
import fHFIL from '../../assets/image/hfil_fil.png';
import FIL from '../../assets/image/fil.png';

import husdt_fil from '../../assets/image/husdt_fil.png';
import hneo_fil from '../../assets/image/hneo_fil.png';
import eth_fil from '../../assets/image/eth_fil.png';
import hbch_fil from '../../assets/image/btc_fil.png';
import ht_fil from '../../assets/image/ht_fil.png';

const logosBySymbol: {[title: string]: string} = {
  'SNB': sfundLogo,
  'Filda': Filda,
  'HLTC': HLTC,
  'fHFIL': fHFIL,
  'FIL': FIL,
  'BAG': BAG,
  'TPT': TPT,
  'CASH': bacLogo,
  'sCASH': bacLogo,
  'HARE': basLogo,
  'SHARE': basLogo,
  'FUND': sfundLogo,
  'SHT': sht,
  'SNEO': sneo,
  'pNEO': neo,
  'NEO': neo,
  'SETH': seth,
  'SBTC': sbtc,
  'HDOT': hdot,
  'SDOT': sdot,
  'HFIL': FIL,
  'SFIL': sfil,
  'wETH': eth,
  'wHT': ht,

  'fHUSD' : husdt_fil,
  'fUSDT': usdt_fil,
  'fHBTC': hbch_fil,
  'fETH': eth_fil,
  'fHT': ht_fil,
  'fNEO': hneo_fil,
  'fHDOT': hdot_fil,
  'fHLTC': hltc_fil,

  'HT': ht,
  'HUSD': HUSD,
  'ETH': seth,
  'HETH': seth,
  'HBTC': btc,
  'SUSD': sUSDLogo,
  'USDC': USDCLogo,
  'USDT': usdt,
  
  'MEDX': medx,
  'sCASH_USDT_LP': medx,
  'sCASH_HUSD_LP': medx,
  'SHARE_USDT_LP': medx,
  'SHARE_HUSD_LP': medx,
};

type BasisLogoProps = {
  symbol: string;
  size?: number;
}

const TokenSymbol: React.FC<BasisLogoProps> = ({ symbol, size = 60 }) => {
  if (!logosBySymbol[symbol]) {
    throw new Error(`Invalid BasisLogo symbol: ${symbol}`);
  }
  return (
    <img
      src={logosBySymbol[symbol]}
      alt={`${symbol} Logo`}
      width={size}
    />
  )
};

export default TokenSymbol;
